//
//  HomeButtonView.m
//  coocsless
//
//  Created by fabian on 04.03.11.
//  Copyright 2011 roboboogie.us. All rights reserved.
//

#import "HomeButtonView.h"


@implementation HomeButtonView
@synthesize labelText;
@synthesize delegate;
@synthesize scrollViewPage;
@synthesize buttonFunction;

- (id)initWithFrame: (CGRect)frame andTitle: (NSString*)title andButtonFunction: (NSString *) pButtonFunction {
	if (self = [super initWithFrame: frame])
	{
		[self setUserInteractionEnabled:YES];
		[self setExclusiveTouch:YES];
		self.labelText = title;
		self.buttonFunction = pButtonFunction;
		[self setTitle:self.labelText forState:UIControlStateNormal];
		[self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
		self.titleLabel.font = [UIFont fontWithName:@"Archer" size:52];
		
	}
	return self;
}

-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
	if ([[touches anyObject] tapCount] == 1) {
		[delegate homeButtonViewWasTapped:self];
	}
	
}


@end
